﻿using System;
using System.Threading.Tasks;

namespace HslCommunication.Core.Net
{
	/// <summary>
	/// 携带TaskCompletionSource属性的异步对象
	/// </summary>
	/// <typeparam name="T">类型</typeparam>
	// Token: 0x02000149 RID: 329
	internal class StateObjectAsync<T> : StateObject
	{
		/// <summary>
		/// 实例化一个对象
		/// </summary>
		// Token: 0x06001CA2 RID: 7330 RVA: 0x0008CB7F File Offset: 0x0008AD7F
		public StateObjectAsync()
		{
		}

		/// <summary>
		/// 实例化一个对象，指定接收或是发送的数据长度
		/// </summary>
		/// <param name="length">数据长度</param>
		// Token: 0x06001CA3 RID: 7331 RVA: 0x0008CB89 File Offset: 0x0008AD89
		public StateObjectAsync(int length) : base(length)
		{
		}

		// Token: 0x170005A4 RID: 1444
		// (get) Token: 0x06001CA4 RID: 7332 RVA: 0x0008CB94 File Offset: 0x0008AD94
		// (set) Token: 0x06001CA5 RID: 7333 RVA: 0x0008CB9C File Offset: 0x0008AD9C
		public TaskCompletionSource<T> Tcs { get; set; }
	}
}
